<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Inject</title>
</head>

<body data-ng-app="myApp">
    <div data-ng-controller="myCtrl">
        <div>
            <span>输入一个数字：<input type="text" data-ng-model="number" /></span>
            <button data-ng-click="square()">X<sup>2</sup></button>
        </div>
        <h3>结果：{{result}}</h3>
    </div>
    <div data-ng-controller="myCtrl2">
        <div>
            <span>输入一个数字：<input type="text" data-ng-model="number" /></span>
            <button data-ng-click="square()">X<sup>2</sup></button>
        </div>
        <h3>结果：{{result}}</h3>
    </div>
    <script src="../node_modules/angular/angular.min.js"></script>
    <script src="inject.js"></script>
</body>

</html>
